package com.huqiwen.test;

import ChartDirector.Chart;
import ChartDirector.DrawArea;

public class ChartCode {
	
	static String replace(String str, String target, String replacement) 
	{
	    String ret = "";
	    int leftPos = 0;
	    int rightPos;
	    while ((rightPos = str.indexOf(target, leftPos)) >= 0)
	    {
	        ret += str.substring(leftPos, rightPos);
	        ret += replacement;
	        leftPos = rightPos + target.length();
	    }
	    return ret + str.substring(leftPos);
	}
	
	public static void main(String[] args) {
		// TODO Auto-generated method stub
//		String str = replace(Chart.getBootLog().trim(), "\n", "<li>");
		String strcodeString = "SXZVFNRN9MZ9L8LGA0E2B1BB";
		System.out.println(strcodeString.length());
		String string = Chart.setLicenseCode(strcodeString);
		if (string.indexOf("successfully")>=0){
			System.out.println(strcodeString);
		}else {
			System.out.println("no");
		}
		int i1 = Chart.getVersion() >> 24 & 0xFF;
		System.out.println(i1);
		System.out.println(string);
	}

}
